import axios from 'axios';
import { get } from 'local-storage';

const Axios = axios.create({});

Axios.interceptors.request.use(
  (config) => {
    config.headers.authorization = `Bearer ${get('userToken')}`;
    return config;
  },
  (err) => {
    return Promise.reject(err);
  },
);

export default Axios;
